using System;
using System.ComponentModel.DataAnnotations;

namespace Sheep_Breeding.Write.Api.DTOs
{
    /// <summary>
    /// 羊只销售添加DTO
    /// </summary>
    public class AddSheepSaleDto
    {
        public DateTime? SaleDate { get; set; }
        public long? CustomerId { get; set; }
        public long? SalesmanId { get; set; }
        public string? OrderNumber { get; set; }
        public string? Address { get; set; }
        public string? SerialNumber { get; set; }
        public string? EarNumber { get; set; }
        public decimal? TransactionPrice { get; set; }
        public decimal? FixedPrice { get; set; }
        public decimal? DiscountRate { get; set; }
        public string? Grade { get; set; }
        public string? Breed { get; set; }
        public string? Gender { get; set; }
        public long? SheepTypeId { get; set; }
        public string? Status { get; set; }
        public string? PenId { get; set; }
        public DateTime? BirthDate { get; set; }
        public decimal? BirthWeight { get; set; }
        public decimal? WeaningWeight { get; set; }
        public string? FatherNumber { get; set; }
        public string? MotherNumber { get; set; }
        public int? MonthAge { get; set; }
        public string? Remark { get; set; }
        public string? CreateUserId { get; set; }
        public DateTime? CreateTime { get; set; }
        public string? ApprovalUserId { get; set; }
        public DateTime? ApprovalTime { get; set; }
        public string? FinanceApprovalUserId { get; set; }
        public DateTime? FinanceApprovalTime { get; set; }
        public string? WarehouseApprovalUserId { get; set; }
        public DateTime? WarehouseApprovalTime { get; set; }
    }

    /// <summary>
    /// 羊只销售更新DTO
    /// </summary>
    public class UpdateSheepSaleDto : AddSheepSaleDto
    {
        [Required(ErrorMessage = "ID不能为空")]
        public long Id { get; set; }
    }

    /// <summary>
    /// 羊只销售删除DTO
    /// </summary>
    public class DeleteSheepSaleDto
    {
        [Required(ErrorMessage = "ID不能为空")]
        public long Id { get; set; }
    }

    /// <summary>
    /// 羊只销售查询DTO
    /// </summary>
    public class SearchSheepSaleDto
    {
        public long? CustomerId { get; set; }
        public long? SalesmanId { get; set; }
        public string? OrderNumber { get; set; }
        public string? EarNumber { get; set; }
        public string? Breed { get; set; }
        public string? Gender { get; set; }
        public long? SheepTypeId { get; set; }
        public string? Status { get; set; }
        public string? PenId { get; set; }
        public DateTime? StartSaleDate { get; set; }
        public DateTime? EndSaleDate { get; set; }
        public int PageIndex { get; set; } = 1;
        public int PageSize { get; set; } = 10;
        public string? ApprovalUserId { get; set; }
        public string? FinanceApprovalUserId { get; set; }
        public string? WarehouseApprovalUserId { get; set; }
    }

    /// <summary>
    /// 羊只销售结果DTO
    /// </summary>
    public class SheepSaleResultDto
    {
        public long Id { get; set; }
        public DateTime? SaleDate { get; set; }
        public long? CustomerId { get; set; }
        public string? CustomerName { get; set; }
        public long? SalesmanId { get; set; }
        public string? SalesmanName { get; set; }
        public string? OrderNumber { get; set; }
        public string? Address { get; set; }
        public string? SerialNumber { get; set; }
        public string? EarNumber { get; set; }
        public decimal? TransactionPrice { get; set; }
        public decimal? FixedPrice { get; set; }
        public decimal? DiscountRate { get; set; }
        public string? Grade { get; set; }
        public string? Breed { get; set; }
        public string? Gender { get; set; }
        public long? SheepTypeId { get; set; }
        public string? SheepTypeName { get; set; }
        public string? Status { get; set; }
        public string? PenId { get; set; }

        public DateTime? BirthDate { get; set; }
        public decimal? BirthWeight { get; set; }
        public decimal? WeaningWeight { get; set; }
        public string? FatherNumber { get; set; }
        public string? MotherNumber { get; set; }
        public int? MonthAge { get; set; }
        public string? Remark { get; set; }
        public string? CreateUserId { get; set; }

        public DateTime? CreateTime { get; set; }
        public string? UpdateUserId { get; set; }

        public DateTime? UpdateTime { get; set; }
        public string? ApprovalUserId { get; set; }

        public DateTime? ApprovalTime { get; set; }
        public string? FinanceApprovalUserId { get; set; }

        public DateTime? FinanceApprovalTime { get; set; }
        public string? WarehouseApprovalUserId { get; set; }

        public DateTime? WarehouseApprovalTime { get; set; }
    }
} 